<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>选择器</title>

	</head>
	<body>
		<div id="d01">这是一个div</div>
		<div class="clss">div-class</div>
		<div class="clss">div-class</div>
		<div class="clss">div-class</div>
		<div class="clss">div-class</div>

		<ul id="u01">
			<li>ul-li-1</li>
			<li class='lis'>ul-li-2 lis</li>
			<li>ul-li-3</li>
			<li>ul-li-4</li>
			<ol>
				<li>ol-li-1</li>
				<li>ol-li-2</li>
				<li>ol-li-3</li>
				<li>ol-li-4</li>
			</ol>
			<li>ul-li-5</li>
			<li>ul-li-6</li>
			<li>ul-li-7</li>
		</ul>
		<p>p-1 haoren</p>
		<p>p-2 lucy</p>
		<p>p-3 lily</p>
		<p>p-4 jerry</p>
		<script src="./js/jQuery/jquery-3.4.1.js"></script>
		<script>
			$(function() {
				var p=$("p:contains('lucy')");
				console.log(p);
				
				
				//获得所有的.clss元素
				var divs = $(".clss");
				console.log(divs);

				var lis = $("#u01 li");
				console.log(lis);
				lis = $("#u01>li");
				console.log(lis);

				var li = $(".lis+li");
				console.log(li);

				var li = $(".lis~li");
				console.log(li);


			});
		</script>

	</body>
</html>
